//
//  RootViewController.m
//  NewChat
//
//  Created by 马欢 on 16/2/27.
//  Copyright © 2016年 蓝鸥. All rights reserved.
//

#import "RootViewController.h"
#import "CommunityTableViewController.h"
#import "FindViewController.h"
#import "CallViewController.h"
#import "FriendViewController.h"
#import "MyCenterViewController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    CommunityTableViewController *comVC = [[CommunityTableViewController alloc]init];
    comVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"社区" image:[UIImage imageNamed:@"community"] tag:101];
    UINavigationController *comNC = [[UINavigationController alloc]initWithRootViewController:comVC];
    FindViewController *findVC = [[FindViewController alloc]init];
    findVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"发现" image:[UIImage imageNamed:@"find"] tag:102];
    UINavigationController *findNC = [[UINavigationController alloc]initWithRootViewController:findVC];
    CallViewController *callVC = [[CallViewController alloc]init];
    callVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"语音" image:[UIImage imageNamed:@"call"] tag:103];
    UINavigationController *callNC = [[UINavigationController alloc]initWithRootViewController:callVC];
    FriendViewController *friendVC = [[FriendViewController alloc]init];
    friendVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"知音" image:[UIImage imageNamed:@"friend"] tag:104];
    UINavigationController *friendNC = [[UINavigationController alloc]initWithRootViewController:friendVC];
    MyCenterViewController *myCenterVC = [[MyCenterViewController alloc]init];
    myCenterVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"中心" image:[UIImage imageNamed:@"center"] tag:105];
    UINavigationController *myCenterNC = [[UINavigationController alloc]initWithRootViewController:myCenterVC];
    
    self.viewControllers = @[comNC,findNC,callNC,friendNC,myCenterNC];
    
                        
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
